package Thread;
//懒汉模式
class SingleTonLazy{
    private static volatile SingleTonLazy instance=null;
    private static SingleTonLazy getInstance(){
        Object locker=new Object();
        if(instance==null){
            synchronized (locker){
                if(instance==null){
                    instance=new SingleTonLazy();
                }
            }
        }
        return instance;
    }
    //构造方法
    private SingleTonLazy(){

    }
}
public class Dom27 {
    public static void main(String[] args) {

    }
}
